DSKINT page# 0001 next
2: COMMENT ⊗   VALID 00017 PAGES
3: C REC  PAGE   DESCRIPTION
4: C00001 00001
5: C00003 00002    BEGIN DSKINT
6: C00006 00003    HERE IS THE 3330 CODE FOR DIAGNOSTIC LOAD AND WRITE
7: C00009 00004    ENTER HERE TO DO A TRANSFER.
8: C00013 00005    DOCHK:  PUSH P,DXW              SAVE A COUPLE OF THINGS
9: C00020 00006    CADDR   CASWAP
10: C00027 00007    ICALLA: SKIPGE TAC,LSTREC               NEED BACKUP?
11: C00030 00008    ICALLC: SKIPE D2LUZ
12: C00032 00009    ESYNC:  MOVEM P,INTPDL
13: C00037 00010    DSKERR          INTERFACE ERRORS
14: C00043 00011                    DISK ERRORS
15: C00046 00012                    ERROR/USAGE STATISTICS
16: C00049 00013                    ERROR PRINT
17: C00055 00014    ERROR CLASS DESCRIPTIONS
18: C00057 00015    ERROR CLASS HANDLERS
19: C00064 00016    HIGH PRIORITY INTERRUPT CODE (HPIC)
20: C00067 00017    MORE HPIC
21: C00069 ENDMK
22: C⊗;
    DSKINT page# 0002 next  prev
24: BEGIN DSKINT
25: ; DEVICE DEPENDENT ROUTINE FOR THE 3330
26: ;THIS ONE RECOVERS FROM ERRORS AS MUCH AS POSSIBLE.
27: 
28: ;HUNG COUNT FOR DISK IN SECONDS
29: DHNGCT←←=5             ;LETS TRY 5 SECONDS FOR NOW
30: DLHNGCT←←=60           ;DIAG LOAD TAKES PRETTY LONG
31: 
32: ;BITS FOR CONO/CONI 500: CONDITION MASKS.
33: 
34: ;LEFT HALF
35: DSKNXM←←200000          ;NON-EX-MEM
36: DCHNER←←100000          ;DATA CHAIN ERROR
37: SELERR←←40000           ;SELECT ERROR
38: CPARER←←20              ;CORE PARITY ERROR
39: 
40: ;RIGHT HALF
41: PARERR←←400000          ;FOR SEPARATE PAR ERR CHECK
42: ↑↑CHDEMP←←200000        ;COMMAND HOLD BUFFER EMPTY
43: IDLE←←100000            ;PMP IN IDLE STATE
44: ↑↑UNEND←←40000+PARERR   ;UNEND OR PARITY ERROR
45: ↑↑NEWST←←20000          ;NEW STATUS BIT FROM PETIT.
46: CPIACT←←20              ;CONI: PI REQUEST UP.
47: 
48: ;BITS FOR CONO 504.
49: 
50: CLREND←←4000            ;CLEAR UNUSUAL END
51: ↑↑ACTCLR←←400           ;CLEAR PI REQUEST
52: ↑↑CNEWST←←200           ;CLEAR NEW STATUS FLAG
53: CLRSTS←←40              ;CLEAR STATUS.
54: CLRCHL←←20             ;CLEAR COMMAND HOLD LOADED
55: CRESET←←1               ;RESET EVERYTHING.
56: 
57: ;STATUS BITS IN CONI PMP (500)
58: 
59: ↑↑ATTN←←10000
60: ↑↑STMOD←←4000
61: ↑↑CUEND←←2000
62: ↑↑BUSY←←1000
63: ↑↑CHNEND←←400
64: ↑↑DEVEND←←200
65: ↑↑UCHK←←100
66: ↑↑UXCPTN←←40
67: 
68: ;THE FOLLOWING BITS ARE FOUND IN THE FIRST 2 SENSE BYTES
69: BITCL0←←155             ;CLASS 0 BITS
70: CMDRJT←←100000          ;COMMAND REJECT IS SPECIAL
71: BITCL1←←20000           ;CLASS 1 BITS
72: BITCL2←←4000            ;CLASS 2 BITS
73: BITCL4←←2000            ;CLASS 4 BITS
74: BITCL5←←40002           ;CLASS 5 BITS
75: WRTINH←←2               ;WRITE INHIBITED
76: PERM←←200               ;PERMANENT ERROR
77: BITEQU←←10000           ;EQUIPMENT CHECK
78: 
79: ERRUSE←←20              ;SENSE BYTE 2, ERROR-USAGE DATA PRESENT
80: 
81: ;THESE ARE FOUND IN SENSE BYTE 7
82: SKCHK←←32               ;SEEK CHECK
83: SKINCP←←33              ;SEEK INCOMPLETE
84: RTYABT←←6               ;RETRY ABORTED
85: DWERR←←320              ;DIAGNOSTIC WRITE CONTROL BIT ERROR
86: DVERR←←100              ;INVALID DATA ARG (PROBABLY DIAG. LOAD)
    DSKINT page# 0003 next  prev
88: ;HERE IS THE 3330 CODE FOR DIAGNOSTIC LOAD AND WRITE
89: WLDIAG:MOVEM 17,DSKACS+17
90:         MOVEI 17,DSKACS
91:         BLT 17,DSKACS+16
92:         MOVEM IOS,DEVIOS(DDB)
93:         SETZ TAC,
94:         DPB TAC,[POINT 3,TSTXOR,11]             ;SO WE DON'T GET ASYNC INT'S
95:         MOVE TAC,DXC
96:         MOVEI TAC,DLHNGCT                       ;DIAGS TAKE QUITE A WHILE
97:         MOVEM TAC,DHNGST
98:         MOVEM TAC,DSKHNG
99:         SETOM DSKACT                            ;FLAG DISK ACTIVE!
100:         SETOM ERRCMD                            ;TELL THEM WHO IT IS
101:         PUSHJ P,ERRCLR                          ;CLEAR ERROR COUNTS
102: WLRTRY: CONO PMP,NEWST!UNEND!10!DSKCHN
103:         CONO IBM,CNEWST!CLREND!ACTCLR           ;COME HERE TO TRY AGAIN
104:         MOVE TAC,DXC
105:         TRNN TAC,DWRITE                         ;THIS TELLS US IF THIS IS
106:         JRST LDIAG1                             ;A LOAD OR WRITE
107:         DATAO PMP,[FILMSK]
108:         DATAO IBM,MSKCMD                        ;SET FILE MASK COMMAND
109:         PUSHJ P,ISYNC
110:         JRST WLRTRY
111:         JRST WLERR
112:         DATAO PMP,DXS                           ;WRITE, ADDRESS OF DIAGNOSTIC
113:         DATAO IBM,DWCMD                         ;IS IN DXS
114:         JRST WLWAIT
115: 
116: LDIAG1: CONO IBM,ACTCLR                         ;CLEAR ACTIVE
117:         DATAO PMP,[DXS]                         ;POINT TO ADDRESS BYTE
118:         DATAO IBM,DLCMD
119: WLWAIT: PUSHJ P,ISYNC
120:         JRST WLRTRY
121:         JRST WLERR
122:         MOVE TAC,PMPCNI
123:         TRNN TAC,DEVEND
124:         JRST WLWAIT
125:         CONO IBM,ACTCLR
126:         DATAO PMP,DXW
127:         DATAO IBM,RD1CMD
128:         PUSHJ P,ISYNC
129:         JRST WLRTRY
130:         JRST WLERR
131:         JRST NOLUZ                              ;RETORE ACS, AND LEAVE
132: 
133: WLERR:  PUSHJ P,DSKERR
134:         JRST WLRTRY
135:         JRST NOLUZ
    DSKINT page# 0004 next  prev
137: ;ENTER HERE TO DO A TRANSFER.
138: 
139: GO2314:MOVEM 17,DSKACS+17
140:         MOVEI 17,DSKACS
141:         BLT 17,DSKACS+16
142:         MOVEM IOS,DEVIOS(DEVDAT)
143:         AOS DSKOPS              ;COUNT TOTAL DSK OPS.
144:         SKIPLE TAC,DXJ          ;GET JOB NUMBER OF USER
145:         AOS DSKOPS(TAC)         ;COUNT A DISK ACCESS FOR THIS USER
146:         SKIPE DXS               ;NOT ON SATOP
147:         PUSHJ P,CSATID          ;CHECK SATID (ROUTINE IS IN DSKSER)
148:         SETOM DSKACT            ;FLAG DISK ACTIVE NOW!
149:         MOVEI TAC,DHNGCT
150:         MOVEM TAC,DHNGST
151:         MOVEM TAC,DSKHNG        ;ENABLE HANG CODE
152:         MOVE TAC,DXC
153:         TRNE TAC,100            ;WRITE OP?
154:         SKIPG TAC,DXS           ;AND FILE OP
155:         JRST NOCHK              ;NO
156:         MOVE TAC1,DSKACS+DDB
157:         TRNN TAC,77             ;RECORD 0?
158:         SKIPGE DDLOC(TAC1)      ;AND NOT GOD?
159:         JRST NOCHK              ;NO
160:         PUSHJ P,DOCHK           ;YES, TO ALL OF THESE, DO OVERWRITE CHECK!
161:         JRST NOLUZ              ;BLEW UP COMPLETELY!
162: NOCHK:  PUSHJ P,CADDR           ;DO ALL THE SETUP CRUD
163:         JRST NOLUZ              ;ILL ADDR
164:         SETOM DSKACT            ;SET DISK ACTIVE FLAG
165:         MOVEI TAC,DHNGCT
166:         MOVEM TAC,DHNGST
167:         MOVEM TAC,DSKHNG
168:         PUSHJ P,ICALL           ;CALL D2CHN
169:         SKIPN D2LUZ
170:         JRST NOLUZ
171:         MOVE TAC,DSKACS+DDB             ;GET DDB ADDRESS
172:         MOVEI TAC1,IODERR       ;GIVE ERROR BIT FOR ILLEGAL WRAP
173:         IORM TAC1,DEVIOS(TAC)
174: NOLUZ:  SETZM DSKACT            ;CLEAR DISK ACTIVE FLAG
175:         SETZM DSKHNG            ;TELL DEVCHK NOT ACTIVE
176:         CONO PMP,NEWST!UNEND!10!DSKCHN
177:         CONO IBM,CNEWST!CLREND!ACTCLR
178:         CONO PI,D2OFF           ;DEACTIVATE HIGH PRIORITY CHANNEL
179:         SKIPE DXS               ;IF NOT SAT TABLE,
180:         PUSHJ P,CSATID          ;CHECK SATID AGAIN (ROUTINE IS IN DSKSER)
181:         MOVE TAC,STAC           ;RESTORE THE SAVED ACS.
182:         MOVE TAC1,STAC1
183:         MOVE P,SAVP
184:         MOVE AC3,SAC3
185:         MOVE DAT,SDAT
186:         JSR DSKSV               ;NOW SAVE THEM ALL.
187:         POP P,INTRTN            ;SET DISMISS ADDR.
188:         MOVSI 17,DSKACS         ;NOW RESTORE RAS'S ACS.
189:         BLT 17,17
190:         MOVE IOS,DEVIOS(DEVDAT) ;GET CURRENT STATUS.
191:         POPJ P,
192: 
    DSKINT page# 0005 next  prev
194: DOCHK:  PUSH P,DXW              ;SAVE A COUPLE OF THINGS
195:         PUSH P,DXC
196:         MOVE TAC,[XWD -SECSIZ,QBUF]
197:         MOVEM TAC,DXW
198:         MOVEI TAC,DSKCHN
199:         MOVEM TAC,DXC
200:         PUSHJ P,CADDR           ;SETUP OVERWRITE CHECK ADDRESS
201:         JRST [  POP P,DXC
202:                 POP P,DXW
203:                 POPJ P,]        ;LOSE BIG, ILLEGAL ADDRESS
204:         POP P,DXC
205:         POP P,DXW
206:         SKIPG DSKLRN            ;MAKE SURE WE MUST CHECK
207:         JRST CPOPJ1             ;NOT FILE OP AFTER ALL, SAY CHECK DONE!
208:         PUSHJ P,ICALL           ;READ RETRIEVAL IN
209:         MOVE TAC1,DSKACS+DDB
210:         MOVEI TAC,IODERR!IODTER
211:         SKIPE D2LUZ             ;ANY GROSS ERRORS?
212:         IORM TAC,DEVIOS(TAC1)   ;YES, SET ERROR BITS
213:         TDNE TAC,DEVIOS(TAC1)   ;NOW TEST FOR ERRORS
214:         POPJ P,                 ;YES, GO AWAY NOW
215:         LDB TAC,[POINT PUNITS,DEVCHR(TAC1),35-PUNITP]
216:         MOVE TAC,SATADR(TAC)    ;GET POINTER TO SAT FOR THIS DEVICE
217:         MOVE TAC,SATID(TAC)     ;GET NAME OF CURRENT GENERATION OF FILES.
218:         CAMN TAC,QBUF+DSATID-DSKDAT     ;IS BLOCK WE'RE WRITING ON CURRENT ?
219:         SKIPN AC3,QBUF          ;FILENAME OF 0 MEANS NOT IN USE.
220:         JRST CPOPJ1             ;THE BLOCK WE'RE WRITING ON IS NOT IN USE.
221:         MOVE TAC,QBUF+1         ;GET EXTENSION.
222:         XOR TAC,FILEXT(TAC1)    ;TAC1 POINTS AT DDB FOR CURRENT OP.
223:         CAMN AC3,FILNAM(TAC1)
224:         TLNE TAC,-1
225:         SKIPN QBUF+3            ;IF PPN IS 0, OR IF
226:         JRST CPOPJ1             ;SAME FILENAME AND EXTENSION. WRITE IS OK.
227: DSKQK1: PUSH P,TEM
228:         HRRZ TEM,DXW            ;THIS POINTS TO THE RETRIEVAL WE ARE REWRITING
229:         MOVE TAC,QBUF+3         ;CHECK PPN
230:         CAMN AC3,(TEM)          ;SAME FILNAME?
231:         CAME TAC,3(TEM)         ;AND PPN?
232:         JRST DSKQKP             ;NO
233:         MOVE TAC,QBUF+1         ;EXT
234:         XOR TAC,1(TEM)
235:         TLNE TAC,-1
236:         JRST DSKQKP
237:         POP P,TEM
238:         JRST CPOPJ1
239: 
240: DSKQKP: POP P,TEM
241: DSKQK2: CAMN AC3,SRCNAM(TAC1)   ;OR PERHAPS RENAMING THE FILE ?
242:         JRST CPOPJ1             ;NOTHING CAN GO WRONGWRONGWRONGWRON
243:         HRRZ TAC,DXW            ;GET STARTING ADDR. OF XFER.
244:         PUSH P,TAC              ;SIGH.  NO ACS FOR VARIABLE SATTAB LOCATION...
245:         LDB TAC,[POINT PUNITS,DEVCHR(TAC1),35-PUNITP]
246:         MOVE TAC,SATADR(TAC)
247:         SKIPL DDLOC(TAC1)       ;IS IT (A) GOD ?
248:         CAMN TAC,(P)            ;IF WE ARE WRITING OUT THE SAT TABLE,
249:         JRST TPOPJ1             ;...THEN ALL IS WELL (?)
250:         POP P,TAC
251:         PUSHACS
252:         PUSHJ P,DISDATE
253:         MOVE UUO,DSKACS+DDB
254:         PUSHJ P,DISERR
255:         [ASCIZ/OVERWRITE CHECK,  LR = /]
256:         DISARG LOC,DSKLRN
257:         [ASCIZ/
258: WRITING FILE   /]
259:         DISARG SIX,FILNAM(UUO)
260:         [ASCIZ/./]
261:         DISARG SIX,FILEXT(UUO)
262:         [ASCIZ/[/]
263:         DISARG SIX,FILPPN(UUO)
264:         [ASCIZ/]  DDLOC = /]
265:         DISARG LOC,DDLOC(UUO)
266:         [ASCIZ/
267: ON TOP OF FILE /]
268:         DISARG SIX,QBUF-DSKDAT+DDNAM
269:         [ASCIZ/./]
270:         DISARG SIX,QBUF-DSKDAT+DDEXT
271:         [ASCIZ/[/]
272:         DISARG SIX,QBUF-DSKDAT+DDPPN
273:         [ASCIZ/]  DDLOC = /]
274:         DISARG LOC,QBUF-DSKDAT+DDLOC
275:         [ASCIZ/
276: 
277: 
278: /]
279:         -1
280:         SKIPN DEBMOD
281:         JRST .+3
282:         SETOM DISFLAG
283:         PUSHJ P,DISFLUSH
284:         POPACS
285:         SKIPE DEBMOD
286:         PUSHJ P,DDTCALL
287: NOOSTP: AOS DSKOVC              ;COUNT OVERWRITE ATTEMPTS.
288:         MOVSI TAC,HDRDIF!PNTDIF ;INDICATE THAT RETRIEVAL MUST BE SPREAD AGAIN.
289:         IORM TAC,DEVIOS(TAC1)
290:         MOVE AC3,TAC1           ;SAVE PTR. TO TABLE OF BLOCK LOCATIONS IN DDB.
291:         PUSH P,AC1
292:         PUSH P,AC2
293:         PUSHJ P,IASNBK          ;ASSIGN A NEW BLOCK TO REPLACE THE ONE WE DON'T
294:                                 ; WANT TO CLOBBER.
295:         MOVE TAC1,[POINT 18,DPTR(AC3)]  ;BYTE PTR. TO TABLE OF BLOCKS IN FILE.
296:         MOVEI AC2,40            ;LENGTH OF TABLE FOR ONE 32K GROUP OF FILE.
297:         ILDB AC1,TAC1           ;SEARCH FOR BLOCK WE WERE WRITING ON.
298:         CAME AC1,DSKLRN         ;DSKLRN IS BLOCK WE WERE WRITING ON.
299:         SOJG AC2,.-2
300: 
301:         JUMPG AC2,DSKQK3        ;DID WE FIND BLOCK IN TABLE ?
302:         POP P,AC2
303:         POP P,AC1
304:         JRST DSKQY
305: DSKQK3: DPB TAC,TAC1            ;REPLACE OLD BLOCK WITH NEW ONE IN TABLE.
306:         POP P,AC2
307:         POP P,AC1
308:         CAME TAC1,[POINT 18,DPTR(AC3),17]       ;WAS IT FIRST BLOCK OF THIS GROUP ?
309:         JRST DSKQZ              ;NO.
310:         MOVSI TAC1,NTRUFD       ;YES. MAKE CLOSE UPDATE UFD ENTRY.
311:         IORM TAC1,DEVIOS(AC3)
312:         MOVEI TAC1,1            ;YES. IS THIS GROUP 1 OF THE FILE ?
313:         CAME TAC1,DGRP1R(AC3)
314:         JRST DSKQY      
315:         HRRZM TAC,FILLOC(AC3)   ;YES. NEW BLOCK IS NEW LOCATION OF FILE.
316:         HRRZM TAC,DDLOC(AC3)    ;ALSO PUT IT HERE.
317:         JRST DSKQZ
318: DSKQY:  MOVEI TAC1,IODERR       ;NO. THERE IS NOTHING REASONABLE WE CAN DO.
319:         IORM TAC1,DEVIOS(AC3)   ;GIVE THE LOSER LOSSAGE BIT.
320:         POPJ P,                 ;SKIP RETURN TO DSKINT.
321: DSKQZ:  PUSHJ P,BK2SEC          ;NOW UPDATE DISK ADDR. OF CURRENT XFER TO BE NEW BLOCK.
322:         MOVEM TAC,DXS
323:         JRST DOCHK
    DSKINT page# 0006 next  prev
325: ;CADDR  CASWAP
326: 
327: CASWAP: TLZ     TAC,400000                              ;CLEAR SWAP OP BIT!
328:         LSH     TAC,-14                                 ;GET JOB NUMBER(WE HOPE)!
329:         IMULI   TAC,<CAT(NTRK,\<NPACKS-1>)/LJOBN>       ;DIVIDE SWAPPING PACK AMONG
330:                                                 ;ALL POSSIBLE JOBS
331:         MOVE    TAC1,SWPDDB
332:         LDB     TAC1,[POINT PUNITS,DEVCHR(TAC1),35-PUNITP]      ;UNIT NUMBER
333:         ADD     TAC,BFSET(TAC1)                 ;ADD OFFSET TO MAKE DISK ADDRESS
334:         HRROM   TAC,DSKLRN                      ;DISABLE MRKBAD
335:         MOVSI   TAC1,(<BYTE(8)1>)               ;WRAP TO RECORD 1 ON 3330
336:         MOVEM   TAC1,XWRAP
337:         MOVEI   TAC1,1                          ;AND START AT RECORD 1
338:         JRST    CDX3                    ;TAC=TRACK NUMBER, TAC1= RECORD NUMBER = 1
339: 
340: CADDR1: MOVE AC3,DXC
341:         TRNE AC3,100            ;SAT TABLE, IS IT WRITE?
342:         JUMPN TAC1,CDX4         ;YES, BETTER BE RECORD 0
343:         SETOM DSKLRN            ;DISABLE MRKBAD
344:         JRST CDX3S              ;TAC=0, TAC1=RECORD NUMBER (=0 FOR WRITE)
345: 
346: ;TAC HAS RELATIVE BLOCK NUMBER
347: CAXTRA: IDIVI TAC,100           ;TAC ← REL BLOCK #, TAC1 ← REC
348:         CAIL TAC,NXTRA0*TRKCYL*BKPTRK
349:         JRST CDX4               ;WE DON'T HAVE THAT MANY EXTRA TRACKS
350: IFG BKPTRK-1,<
351:         MOVEI AC3,(TAC1)
352:         IDIVI TAC,BKPTRK
353:         IMULI TAC1,CRMAX
354:         ADDI TAC1,(AC3)
355: >
356:         CAIL TAC1,RCPTRK
357:         JRST CDX4               ;RECORD NUMBER TOO BIG
358:         SETZB AC3,XWRAP         ;PACK 0, WRAP AROUND TO RECORD 0
359:         SETOM DSKLRN            ;DISABLE MRKBAD
360:         ADDI TAC,NTRK0          ;OFFSET TO END OF PACK 0
361:         JRST CDXE
362: 
363: CADDR:  MOVE TAC,DXW
364:         HRLZ TAC1,DXC
365:         TLNN TAC1,100           ;READ OR RIGHT?
366:         TROA TAC1,-1            ;FLAG READ
367:         SUB TAC,[1,,0]          ;CAUSES CHNL TO NOT STOP XFER TOO SOON
368:         MOVEM TAC,XWCMA
369:         MOVE TAC,WCMD(TAC1)     ;PICKUP COMMAND
370:         MOVEM TAC,XCMD
371:         MOVE TAC,ENDTAB(TAC1)   ;PICKUP INSTRUCTION FOR ENDING TEST ON WC
372:         MOVEM TAC,ENDTST        ;AND STUFF IT AWAY
373:         MOVE TAC,[JSR D2INT]    ;MAKE SURE D2CHN KNOWS WHERE TO GO
374:         MOVEM TAC,140+2*D2CHN
375:         SKIPGE TAC,DXS
376:         JRST CASWAP             ;SIGN BIT MEANS SWAP OP, WITH SHIFTED JOB NUMBER
377:         TLZE TAC,200000
378:         JRST CAXTRA             ;200000 BIT MEANS XTRA CYL PACK 0 OP
379:         IDIVI TAC,100                   ;TRACK INTO TAC, RECORD INTO TAC1
380:         JUMPE TAC,CADDR1                ;JUMP IF SAT TABLE OPERATION
381:         MOVEM TAC,DSKLRN                ;SAVE LOGICAL BLOCK NUMBER IN CASE OF ERROR
382:         MOVE AC3,DSKACS+DDB             ;FIND OUT IF IT'S A FILE OP OR OLD UDP OP
383:         MOVE AC3,DEVMOD(AC3)
384:         TLNN AC3,DVDSK                  ;FILE OP?
385: ;       CAILE TAC,LSTBIT                ;FILE OP? (HOW IT USED TO CHECK--;ED OUT!)
386:         HRROS DSKLRN                    ;NO, DISABLE MRKBAD
387: IFG BKPTRK*NSATBK-1,<
388:         ADDI TAC,BKPTRK*NSATBK-1        ;LEAVE ENOUGH ROOM FOR SAT TABLE
389: >
390: IFG BKPTRK-1,<                          ;ASSEMBLE CODE FOR MULTIPLE BLOCKS/TRACK
391:         MOVEI AC3,(TAC1)
392:         IDIVI TAC,BKPTRK                ;DIVIDE BY BLOCKS/TRACKS
393:         IMULI TAC1,CRMAX                ;TIMES RECORDS/BLOCK (INCL RETRIEVAL)
394:         ADDI TAC1,(AC3)                 ;CALC REAL DISK RECORD NUMBER
395: >
396: CDX3S:  SETZM XWRAP                     ;WRAP TO RECORD ZERO ON OVERFLOW
397: CDX3:   CAIGE TAC1,RCPTRK               ;RECORD OK?
398:         CAILE TAC,LSTTRK                ;OFF END OF WORLD?
399:         JRST CDX4                       ;LOSER
400: 
401:         MOVSI AC3,-NPACKS               ;SEARCH FOR THE PACK CONTAINING THIS TRACK
402: CDXL:   CAMLE TAC,PACKAD(AC3)
403:         AOBJN AC3,CDXL
404:         JUMPGE AC3,CDX4                 ;THIS IS TOO HORRIBLE TO THINK ABOUT.
405:         SUB TAC,PACKAD-1(AC3)
406:         SUBI TAC,1                      ;AC3=PACK, TAC=TRACK NUMBER ON THAT PACK
407: CDXE:   ROT TAC1,-8                     ;PUT RECORD BYTE IN LEFT BYTE
408:         MOVEM TAC1,SCDAT+1              ;STUFF AWAY
409:         IDIVI TAC,TRKCYL                ;STRIP OFF HEAD NUMBER
410:         DPB TAC1,[POINT 8,SKDAT+1,15]   ;STUFF HEAD NUMBER
411:         DPB TAC1,[POINT 16,SCDAT,31]
412:         DPB TAC,[POINT 16,SKDAT,31]     ;STUFF CYLINDER NUMBER
413:         DPB TAC,[POINT 16,SCDAT,15]
414:         DPB AC3,[POINT 3,SKCMD,21]      ;STUFF PACK NUMBER
415:         DPB AC3,[POINT 3,SCCMD,21]
416:         DPB AC3,[POINT 3,XCMD,21]
417:         DPB AC3,[POINT 3,NOPCMD,21]
418:         DPB AC3,[POINT 3,SNSCMD,21]
419:         DPB AC3,[POINT 3,RDHACM,21]
420:         DPB AC3,[POINT 3,RCALCM,21]
421:         DPB AC3,[POINT 3,TSTXOR,11]
422:         SETZM LWCMA                     ;NO LAST ERROR YET!
423:         SETZM LSTOP
424:         SETOM LSTREC                    ;FOR SAFETY, FLAG XWCMA & SCDAT ARE NEXT OP TO DO
425:         JRST CPOPJ1
426: 
427: CDX4:   MOVEM TAC,TYPANY        ;STUFF AWAY HERE FOR NOW
428:         MOVEM TAC1,DSKFLG
429:         PUSHACS
430:         PUSHJ P,DISERR
431:         [ASCIZ/ILLEGAL DISK ADDRESS.  DXS = /]
432:         DISARG OCT,DXS
433:         [ASCIZ/
434: LR = /]
435:         DISARG LOC,TYPANY
436:         [ASCIZ/  REC = /]
437:         DISARG LOC,DSKFLG
438:         [ASCIZ/
439: JOB = /]
440:         -1
441:         HRRZ J,DXJ
442:         JUMPE J,.+2
443:         PUSHJ P,DISJOB
444:         SKIPL DXS
445:         JRST NOGOD
446:         PUSHJ P,DISMES
447:         ASCIZ/  SWAP OP!/
448: NOGOD:  PUSHJ P,DISMES
449:         ASCIZ/
450: 
451: /
452:         POPACS
453:         MOVE TAC,DSKACS+DDB
454:         MOVEI TAC1,IODERR
455:         IORM TAC1,DEVIOS(TAC)
456:         POPJ P,
457: 
    DSKINT page# 0007 next  prev
459: ICALLA: SKIPGE TAC,LSTREC               ;NEED BACKUP?
460:         JRST ICALLN                     ;NO, XWCMA & SCDAT ARE NEXT OP TO DO
461:         SETOM LSTREC                    ;NOTE WE ARE BACKED UP
462:         EXCH TAC,SCDAT+1                ;BACKUP RECORD
463:         CAMLE TAC,SCDAT+1               ;DO WE BACK UP A TRACK?
464:         JRST TOK                        ;NO
465:         MOVSI TAC,(<BYTE(16)<-1>>)      ;GET SOMETHING TO DECREMENT HEAD ADDR
466:         ADDB TAC,SKDAT+1                ;DECREMENT HEAD ADDR
467:         JUMPGE TAC,COK                  ;CYLINDER OK?
468:         MOVNI TAC,14
469:         ADDB TAC,SKDAT                  ;DECREMENT CYLINDER
470:         MOVSI TAC,(<BYTE(16)TRKCYL-1>)
471:         MOVEM TAC,SKDAT+1               ;SET HEAD TO LAST TRACK OF CYLINDER
472: COK:    HLRZ TAC,SKDAT+1                ;NOW COMPUTE SCDAT FROM SKDAT
473:         LSH TAC,4
474:         HRL TAC,SKDAT
475:         LSH TAC,-2
476:         MOVEM TAC,SCDAT                 ;STORE UPDATED SEARCH LOC
477: TOK:    LDB TAC,[POINT 8,SCDAT+1,7]     ;USE RECORD NUMBER,
478:         MOVN TAC,RCLTAB(TAC)            ;TO GET VALUE TO,
479:         ADDM TAC,XWCMA                  ;BACKUP XWCMA BY
480: ICALLN: HRRZ TAC,D2X                    ;GET LOC OF LAST JSR +1
481:         LDB TAC,[POINT 4,-1(TAC),12]    ;GET CODE FROM AC FIELD OF JSR
482:         MOVE TAC1,XCMD                  ;SET FOR DSKERR CODE AS LAST OP IN PROGRESS
483:         TRNE TAC1,1                     ;WRITE OP?
484:         CAIE TAC,2                      ;YES, IF LAST OP IN PROGRESS WAS READ OR WRITE,
485:         CAIA
486:         ADDI TAC,1                      ;SET CODE FOR WRITE
487:         MOVEM TAC,ERRCMD
488:         MOVE TAC1,XWCMA                 ;GET ERROR WCMA
489:         CAMN TAC,LSTOP                  ;SAME COMMAND IN ERROR?
490:         CAME TAC1,LWCMA                 ;AND SAME WCMA
491:         CAIA
492:         POPJ P,                         ;NO, DON'T RESET COUNTS
493:         MOVEM TAC,LSTOP
494:         MOVEM TAC1,LWCMA                ;REMEMBER LAST ERROR
495: ERRCLR:                                 ;ENTER HERE TO CLEAR ERROR COUNTS
496: FOR @!X←0,4<
497:         SETZM ERRCL!X>
498:         SETOM SHADPE
499:         POPJ P,
    DSKINT page# 0008 next  prev
501: ICALLC: SKIPE D2LUZ
502:         POPJ P,                         ;EOD, RETURN NOW!!!!!
503: ICALL:  SETZM D2DONE                    ;NOT SUCCESSFUL YET!
504:         SETZM D2LUZ                     ;HAVEN'T LOST YET
505:         SETOM CT                        ;MAKE SURE WE DON'T INTERPRET RANDOM ERRORS AS LOSING SEARCHES
506:         MOVEI TAC,D2IGO                 ;START D2CHN HERE
507:         MOVEM TAC,D2X
508:         CONO PI,D2ON                    ;TURN ON HIGH PRIORITY CHANNEL
509:         CONO IBM,CNEWST!CLREND!CLRCHL   ;MAKE SURE AN INT WILL HAPPEN
510:         CONO PMP,NEWST!UNEND!CHDEMP!10!D2CHN    ;DOWN TO CHANNEL 2
511:         PUSHJ P,ESYNC                   ;WAIT TILL DONE OR ERROR
512:         JRST ICALLB                     ;RETRY, START D2CHN OVER
513:         AOSN D2DONE                     ;SUCCESSFUL OP?
514:         POPJ P,                         ;YES, JUST RETURN
515:         PUSHJ P,ICALLA                  ;GRONK PARMS
516:         PUSHJ P,DSKERR                  ;ERROR, CALL ROUTINE
517:         JRST ICALLC                     ;TRY AGAIN
518:         POPJ P,                         ;QUIT, ERRORS ALREADY POSTED
519: 
520: ICALLB: PUSHJ P,ICALLA
521:         JRST ICALLC
522: 
523: ISYNC:  PUSHJ P,ESYNC                   ;WAIT FOR OP TO HAPPEN
524:         POPJ P,                         ;TRY AGAIN RETURN
525:         AOS (P)                         ;AT LEAST ONE SKIP
526:         MOVE TAC,PMPCNI                 ;GET CONI BITS
527:         TRNE TAC,UNEND!ATTN!UXCPTN!CUEND!STMOD;ANY ERRORS?
528:         POPJ P,                         ;YES, RETURN
529:         JRST CPOPJ1                     ;NO ERRORS
    DSKINT page# 0009 next  prev
531: ESYNC:  MOVEM P,INTPDL
532:         SETZM HNGFLG                    ;ALWAYS CLEAR HUNG FLAG HERE!
533:         JRST @INTRTN
534: 
535: IXINT: MOVEM TAC,STAC                  ;ENTER HERE FROM LOW-PRIORITY CHANNEL
536:         MOVEM TAC1,STAC1
537:         MOVEM AC3,SAC3
538:         MOVEM DAT,SDAT
539:         MOVEM P,SAVP
540:         MOVE P,INTPDL
541:         MOVEI TAC,IXINT2
542:         MOVEM TAC,INTRTN
543:         CONI PMP,TAC
544:         MOVEM TAC,PMPCNI
545:         TRNE TAC,UNEND                  ;UNUSUAL END?
546:         CONO IBM,CLRCHL                 ;YES, CLEAR ANY WAITING COMMANDS
547:         CONO IBM,CNEWST!CLREND          ;CLEAR NEWST AND UNEND WHEN STATUS GOBBLED
548:         SKIPN DSKACT                    ;IS DISK ACTIVE AT ALL?
549:         JRST ASYNC                      ;NO
550:         MOVE TAC1,DHNGST                ;THIS IS DISK HUNG TIME COUNT IN SECONDS
551:         MOVEM TAC1,DSKHNG               ;THIS IS WHERE IT IS COUNTED DOWN
552:         TRNN TAC,NEWST                  ;IS THIS DEVICE STATUS?
553:         JRST CPOPJ1                     ;NO, MUST BE END OF TRANSFER, RETURN
554:         TRNE TAC,CUEND                  ;CUEND ALONE?
555:         POPJ P,                         ;INDICATE TRY AGAIN
556:         TRC TAC,STMOD!BUSY
557:         TRCN TAC,STMOD!BUSY             ;CU BUSY?
558:         JRST CKBUSY                     ;YES
559:         XOR TAC,TSTXOR
560:         TLNN TAC,37700                  ;WRONG ADDRESS?
561:         JRST CHKRTY                     ;NO, CHECK RETRY
562:         JRST ASYNC0                     ;USE STACK WE HAVE
563: 
564: ASYNC:  MOVE TAC,STAC                   ;RESTORE STATE OF AC'S
565:         MOVE TAC1,STAC1
566:         MOVE AC3,SAC3
567:         MOVE DAT,SDAT
568:         MOVE P,SAVP
569:         JSR DSKSAV                      ;NOW SAVE THEM ALL!
570: ASYNC0: CONO IBM,CLRCHL
571:         PUSHACS
572:         PUSHJ P,DISDATE
573:         LDB TAC,[POINT 8,PMPCNI,30]
574:         CAIN TAC,DEVEND-5              ;JUST DEVEND?
575:         JRST DEVRDY                     ;YES, SHORT MES.
576:         PUSHJ P,DISMES
577:         ASCIZ/ASYNCHRONOUS DISK DEVICE INTERRUPT.
578: /
579:         JRST SWAIT
580: 
581: DEVRDY: PUSHJ P,DISMES
582:         ASCIZ/DISK PACK /
583:         LDB TAC,[POINT 3,PMPCNI,11]
584:         PUSHJ P,DISLOC
585:         PUSHJ P,DISMES
586:         ASCIZ/ ON LINE.
587: /
588: SWAIT:  PUSHJ P,DISERR
589:         [ASCIZ/CONI BITS = /]
590:         DISARG OCT,PMPCNI
591:         [ASCIZ/
592: /]
593:         -1
594:         CONSO PMP,NEWST
595:         JRST SDONE
596:         CONI PMP,PMPCNI
597:         CONO IBM,CNEWST!CLREND
598:         JRST SWAIT
599: SDONE:  SKIPN DSKACT                    ;ARE WE ACTIVE?
600:         JRST SDONE0
601:         PUSHJ P,DISMES
602:         ASCIZ/DISK ACTIVE, PACK = /
603:         LDB TAC,[POINT 3,TSTXOR,11]
604:         PUSHJ P,DISLOC
605: SDONE0: PUSHJ P,DISMES
606:         ASCIZ/
607: 
608: /
609:         POPACS
610:         PUSHJ P,BLAST                   ;WAIT FOR IDLE THEN RESET
611:         SKIPE DSKACT                    ;IS DISK REALLY ACTIVE?
612:         JRST UCHKTS                     ;GIVE TRY AGAIN RETURN!
613:         CONO PMP,NEWST!UNEND!10!DSKCHN  ;WE AREN'T ACTIVE, SET TO QUIET STATE
614:         CONO IBM,ACTCLR
615:         POPJ P,                         ;THIS WILL RESTORE AC'S AND JEN
616: 
617: UCHKTS: MOVE TAC,PMPCNI
618:         TRNN TAC,STMOD                  ;IF STATUS MODIFIER
619:         TRNN TAC,UCHK                   ;OR NOT UNIT CHECK
620:         POPJ P,                         ;THEN GIVE TRY AGAIN RETURN
621:         SETZM D2DONE                    ;MAKE SURE ERROR ROUTINE IS CALLED
622:         JRST CPOPJ1                     ;GIVE DONE RETURN
623: 
624: IXINT2: MOVE TAC,STAC
625:         MOVE TAC1,STAC1
626:         MOVE AC3,SAC3
627:         MOVE DAT,SDAT
628:         MOVE P,SAVP
629:         JEN @DSKCHL
630: 
631: CKBUSY: SETZM D2DONE                    ;MAKE SURE WE DON'T LOOK DONE!
632: ;       EXCH DDB,DXB
633: ;       LDB TAC1,PDVTIM                 ;MAKE SURE LOSER DOSEN'T HANG
634: ;       DPB TAC1,PDVCNT
635: ;       EXCH DDB,DXB
636:         TRNE TAC,CUEND                  ;CUEND ALREADY?
637:         POPJ P,                         ;TRY AGAIN
638: WAIT:   CONO PMP,NEWST!UNEND!10!DSKCHN
639:         CONO IBM,ACTCLR
640:         JRST IXINT2                     ;WAIT FOR CUEND
641: 
642: CHKRTY: TRC TAC,STMOD!UCHK
643:         TRCE TAC,STMOD!UCHK
644:         JRST CPOPJ1
645:         SETZM D2DONE
646:         TRNN TAC,DEVEND
647:         JRST WAIT
648:         JRST CPOPJ1
    DSKINT page# 0010 next  prev
650: ;DSKERR         INTERFACE ERRORS
651: DSKERR: PUSHACS
652:         CONO IBM,CLRCHL
653:         CONO IBM,CNEWST!CLREND          ;FROM HERE ON CHANNEL SHOULD BE IDLE
654:         SETZM TYPANY                    ;NO TYPE OUT YET
655:         SETZM SNSTYP
656:         SETZM CSTOP
657:         SETZM DEATH
658:         SETZM HAFLAG
659:         SETZM DSKFLG                    ;HAVEN'T FOUND OUT WHY YET
660:         MOVE UUO,PMPCNI                 ;GET ERROR BITS
661:         MOVEM UUO,CNISAV                ;AND SAVE THEM IN A SAFE PLACE
662:         DATAI IBM,XDSKMA                        ;GET CURRENT MA
663:         TLNN UUO,SELERR                 ;IF SELECT ERROR, CHECK IF OFF LINE
664:         JRST NOSEL                      ;NO
665:         CONO IBM,CRESET                 ;EXTRA RESET FOR SELERR
666:         PUSHJ P,BLAST
667:         POPACS
668:         CONO IBM,CNEWST!CLREND!ACTCLR
669:         CONO PMP,NEWST!UNEND!10!DSKCHN
670:         DATAO IBM,NOPCMD
671:         PUSHJ P,ISYNC
672:         JRST .-2                        ;TRY AGAIN?
673:         JFCL                            ;SORT OF IGNORE ERROR RETURN
674:         PUSHACS                         ;GET ACS BACK(FORTH?)
675:         MOVE TAC,PMPCNI
676:         TLNN TAC,SELERR                 ;STILL SELECT ERROR?
677:         JRST NOSELA
678:         CONO IBM,CRESET
679:         PUSHJ P,BLAST
680:         PUSHJ P,DISMES
681:         ASCIZ/I THINK I'M OFF LINE!
682: /
683:         AOS CSTOP
684: NOSELA: PUSHJ P,ERROR1
685:         MOVE UUO,CNISAV
686: NOSEL:  SKIPGE CT                       ;TOO MANY LOSING SEARCHES?
687:         JRST NOLSRC                     ;NO
688:         PUSHJ P,DISMES
689:         ASCIZ/TOO MANY LOSING SEARCHES.
690: /
691:         AOS TYPANY
692:         PUSHJ P,ERROR0
693:         HLRZ TAC,SKDAT+1                ;THIS IS A BUG TRAP!!!!*******
694:         LSH TAC,4
695:         HRL TAC,SKDAT
696:         LSH TAC,-2
697:         EXCH TAC,SCDAT
698:         CAMN TAC,SCDAT
699:         JRST NOLSRC
700:         PUSH P,TAC
701:         PUSHJ P,DISERR
702:         [ASCIZ/SCDAT WAS CLOBBERED!
703: OLD SCDAT = /]
704:         DISARG OCT,<-1(P)>
705:         [ASCIZ/
706: NEW SCDAT = /]
707:         DISARG OCT,SCDAT
708:         [ASCIZ/
709: /]
710:         -1
711:         POP P,TAC                       ;END BUG TRAP!!!!*********
712: NOLSRC: SKIPN HNGFLG                    ;DOES SOMEONE THINK WE'RE HUNG?
713:         JRST NOHUNG                     ;NO
714:         AOS DSKFLG
715:         AOS TYPANY
716:         PUSHJ P,DISMES
717:         ASCIZ/HUNG TIMEOUT!
718: /
719: NOHUNG: TDNE UUO,[DCHNER,,ATTN!BUSY!UXCPTN]     ;DATA CHAIN ERROR?
720:         PUSHJ P,ERROR0                  ;CLASS 0 ERROR
721:         TLNN UUO,DSKNXM                 ;NXM?
722:         JRST NONXM
723:         PUSHJ P,DISERR
724:         [ASCIZ/DISK NON-EX-MEM.
725: DISK MA = /]
726:         DISARG LOC,XDSKMA
727:         [ASCIZ/
728: /]
729:         -1
730:         PUSHJ P,ERROR1                  ;ERROR, CLASS ONE
731:         AOS TYPANY                      ;ALWAYS TYPE
732: NONXM:  TLNN UUO,CPARER                 ;CORE PARITY ERROR?
733:         JRST BPAR
734:         MOVE TAC,XDSKMA
735:         CAMG TAC,RMEMSIZ
736:         CAIGE TAC,20
737:         AOSE SHADPE
738:         JRST REALPE     ;AW, LOOK, WE'VE BEEN ALL THROUGH THIS BEFORE
739:         PUSHJ P,ZSHAD
740:         JFCL            ;ZSHAD SKIPS IF NO FAST ACS
741:         AOS DSKFLG
742:         JRST NOPAR      ;IGNORE IT FOR NOW
743: REALPE: PUSHJ P,DISERR
744:         [ASCIZ/CORE TO DISK PARITY ERROR.
745: DISK MA = /]
746:         DISARG LOC,XDSKMA
747:         [ASCIZ/
748: /]
749:         -1
750:         SKIPA TAC,RMEMSIZ               ;LOOK AT ALL OF CORE FOR ERROR
751:         SKIP (TAC)
752:         SOJGE TAC,.-1
753:         AOS TYPANY                      ;TELL THEM WHO LOST
754: BPAR:   TRNN UUO,PARERR                 ;PARITY ERROR
755:         JRST NOPAR                      ;NO
756:         PUSHJ P,ERROR1                  ;ERROR, CLASS ONE
    DSKINT page# 0011 next  prev
758: ;               DISK ERRORS
759: NOPAR:  TRNE UUO,NEWST                  ;WILL UCHK BE HONEST?
760:         TRNN UUO,UCHK                   ;YES, WAS THERE A UNIT CHECK?
761:         JRST TYPE0                      ;NO, CHECK TYPEOUT AND ERROR FLAGS
762:         POPACS
763:         PUSHJ P,SENSE                   ;DO SENSE
764:         CAIA                            ;SENSE LOST
765:         JRST SNSDON
766:         PUSHACS
767:         PUSHJ P,DISMES
768:         ASCIZ/SENSE FAILED.
769: /
770:         AOS CSTOP                       ;INDICATE COLD STOP
771:         AOS TYPANY
772:         PUSHJ P,ERROR1                  ;THIS IS CLASS 1 ERROR
773:         JRST TYPE0
774: 
775: SNSDON: PUSHACS
776:         AOS SNSTYP                      ;INDICATE TYPEOUT OF SENSE DATA
777:         LDB UUO,[POINT 16,SNSDAT,15]    ;GET FIRST TWO BYTES OF SENSE
778:         TRNN UUO,CMDRJT                 ;COMMAND REJECT?
779:         JRST NORJCT                     ;NO
780:         TRNE UUO,WRTINH                 ;WRITE INHIBITED?
781:         JRST NORJCT                     ;YES, CATCH IT AT CLASS 5
782:         LDB TAC,[POINT 8,SNSDAT+1,31]   ;PICK UP BYTE 7
783:         CAIE TAC,DVERR                  ;INVALID DATA?
784:         CAIN TAC,DWERR                  ;DIAGNOSTIC WRITE ERROR?
785:         SKIPL ERRCMD                    ;IS IT REALLY US?
786:         CAIA                            ;NO, MAYBE REAL LOSSAGE
787:         JRST [  AOS DEATH
788:                 AOS DSKFLG              ;KILL THE BUM
789:                 JRST NORJCT]
790:         PUSHJ P,ERROR0                  ;OTHERWISE ERROR CLASS 0
791: NORJCT: TRNE UUO,BITCL0                 ;OTHER CLASS 0 ERROR?
792:         PUSHJ P,ERROR0                  ;ERROR, CLASS 0
793:         TRNE UUO,BITCL1                 ;BUS OUT PARITY IS
794:         PUSHJ P,ERROR1                  ;ERROR, CLASS 1
795:         TRNN UUO,BITEQU                 ;EQUIPMENT CHECK IS CLASS 1 OR 3
796:         JRST NOCL13
797:         LDB TAC,[POINT 8,SNSDAT+1,31]   ;GET SENSE BYTE 7
798:         CAIE TAC,SKCHK                  ;SEEK CHECK
799:         CAIN TAC,SKINCP                 ;OR SEEK INCOMPLETE
800:         JRST SKCHKA                     ;ARE CLASS 3
801:         CAIN TAC,RTYABT                 ;COMMAND RETRY ABORTED?
802:         JRST [  PUSHJ P,ERROR4          ;ERROR, CLASS 4
803:                 JRST NOCL13]
804:         TRNE UUO,PERM                   ;REAL EQUIPMENT CHECK, IS IT PERMANENT?
805:         AOS CSTOP                       ;YES, COLD STOP
806:         PUSHJ P,ERROR1                  ;ALL ELSE IS CLASS 1
807:         JRST NOCL13
808: 
809: SKCHKA: POPACS
810:         PUSHJ P,ERROR3
811:         PUSHACS
812:         LDB UUO,[POINT 16,SNSDAT,15]    ;RELOAD UUO
813: NOCL13: TRNE UUO,BITCL2                 ;DATA CHECK?
814:         PUSHJ P,ERROR2                  ;ERROR, CLASS 2
815:         TRNE UUO,BITCL4                 ;OVERRUN?
816:         PUSHJ P,ERROR4                  ;ERROR, CLASS 4
817:         TRNE UUO,BITCL5                 ;INT. REQ. OR WRITE LOCK?
818:         PUSHJ P,ERROR5                  ;ERROR, CLASS 5
    DSKINT page# 0012 next  prev
820: ;               ERROR/USAGE STATISTICS
821:         LDB TAC,[POINT 8,SNSDAT,23]     ;PICK-UP BYTE 2
822:         TRNN TAC,ERRUSE                 ;ERROR-USAGE DATA?
823:         JRST TYPE0
824:         AOS DSKFLG
825:         PUSHJ P,DISDATE
826:         PUSHJ P,DISMES
827:         ASCIZ/3330 ERROR-USAGE STATISTICS.
828: /
829:         PUSHJ P,DRIVEP                  ;PRINT DRIVE ID
830:         PUSHJ P,DISMES
831:         ASCIZ/  PACK = /
832:         LDB TAC,[POINT 3,LSTAT,11]
833:         PUSHJ P,DISLOC
834:         PUSHJ P,DISMES
835:         ASCIZ/
836: TBYTES = /
837:         LDB TAC,[POINT 32,SNSDAT+2,31]  ;BYTES 8-11 TOTAL BYTES
838:         PUSHJ P,DISDEC                  ;IN DECIMAL
839:         LDB UUO,[POINT 16,SNSDAT+3,15]  ;BYTES 12-13 CORRECTABLE DATA CHECKS
840:         JUMPE UUO,ERRU1
841:         PUSHJ P,DISMES
842:         ASCIZ/
843: CDCHKS = /
844:         MOVE TAC,UUO
845:         PUSHJ P,DISDEC
846: ERRU1:  LDB UUO,[POINT 16,SNSDAT+3,31]  ;BYTES 14-15 RETRY DATA CHECKS
847:         JUMPE UUO,ERRU2
848:         PUSHJ P,DISMES
849:         ASCIZ/
850: RDCHKS = /
851:         MOVE TAC,UUO
852:         PUSHJ P,DISDEC
853: ERRU2:  PUSHJ P,DISMES
854:         ASCIZ/
855: NSEEKS = /
856:         LDB TAC,[POINT 16,SNSDAT+4,15]  ;BYTES 16-17 NUMBER OF SEEKS
857:         PUSHJ P,DISDEC
858:         LDB UUO,[POINT 8,SNSDAT+4,31]   ;BYTE 19 NUMBER OF ERROR SEEKS
859:         JUMPE UUO,ERRU3
860:         PUSHJ P,DISMES
861:         ASCIZ/
862: ESEEKS = /
863:         MOVE TAC,UUO
864:         PUSHJ P,DISDEC
865: ERRU3:  LDB UUO,[POINT 8,SNSDAT+5,7]    ;BYTE 20 COMMAND OVERRUNS
866:         JUMPE UUO,ERRU4
867:         PUSHJ P,DISMES
868:         ASCIZ/
869: COVRRN = /
870:         MOVE TAC,UUO
871:         PUSHJ P,DISDEC
872: ERRU4:  LDB UUO,[POINT 8,SNSDAT+5,15]   ;BYTE 21 DATA OVERRUNS
873:         JUMPE UUO,ERRU5
874:         PUSHJ P,DISMES
875:         ASCIZ/
876: DOVRRN = /
877:         MOVE TAC,UUO
878:         PUSHJ P,DISDEC
879: ERRU5:  PUSHJ P,DISMES
880:         ASCIZ/
881: 
882: 
883: /
    DSKINT page# 0013 next  prev
885: ;               ERROR PRINT
886: TYPE0:  SKIPE DSKFLG
887:         JRST TYPE1
888:         AOS TYPANY
889:         PUSHJ P,DISMES
890:         ASCIZ/UNKNOWN /
891: TYPE1:  SKIPN TYPANY                    ;TYPE ANYTHING?
892:         JRST ERRGO                      ;NO, END OF TYPE CHECKING
893:         PUSHJ P,DISMES
894:         ASCIZ/DISK ERROR. /
895:         PUSHJ P,DISDAT
896:         MOVE UUO,DSKACS+DDB
897:         SKIPL DSKLRN                    ;FILE OP?
898:         SKIPN FILNAM(UUO)               ;ANY FILE?
899:         JRST NOFIL                      ;NO, DON'T PRINT CRUD
900:         PUSHJ P,DISMES
901:         ASCIZ/FILE = /
902:         MOVE TAC1,FILNAM(UUO)
903:         PUSHJ P,DISSIX
904:         HLLZ TAC1,FILEXT(UUO)
905:         JUMPE TAC1,NOEXT
906:         MOVEI TEM,"."
907:         PUSHJ P,DISTYO
908:         HLLZ TAC1,FILEXT(UUO)
909:         PUSHJ P,DISSIX
910: NOEXT:  MOVEI TEM,"["
911:         PUSHJ P,DISTYO
912:         MOVE TAC1,FILPPN(UUO)
913:         PUSHJ P,DISSIX
914:         PUSHJ P,DISMES
915:         ASCIZ/]    /
916: NOFIL:  MOVE UUO,ERRCMD
917:         ADDI UUO,1                      ;OFFSET SO DIAG WORKS
918:         PUSHJ P,DISERR
919:         (UUO)[  ASCIZ/DIAG/             ;-1
920:                 ASCIZ/SEEK/
921:                 ASCIZ/SRCH/
922:                 ASCIZ/READ/
923:                 ASCIZ/WRITE/]           ;3
924:         [ASCIZ/ OP
925: /]
926:         -1
927:         MOVE TAC,DSKLRN
928:         CAMN TAC,[-1]
929:         JRST SATPNT
930:         CAMN TAC,[-2]                   ;THIS IS SET FOR ASYNC ERRORS
931:         JRST NSWAP
932:         PUSHJ P,DISMES
933:         ASCIZ/JOB = /
934:         HRRZ TAC,DXJ
935:         PUSHJ P,DISDCP
936:         SKIPL DXJ
937:         JRST NSWAP1
938:         PUSHJ P,DISMES
939:         ASCIZ/ SWAP/
940: NSWAP1: PUSHJ P,DISERR
941:         [ASCIZ/  DXS = /]
942:         DISARG OCT,DXS
943:         [ASCIZ/  DXW = /]
944:         DISARG OCT,DXW
945:         -1
946:         JRST NSWAP
947: 
948: SATPNT: PUSHJ P,DISMES
949:         ASCIZ/SAT TABLE/
950: NSWAP:  PUSHJ P,DISERR
951:         [ASCIZ/
952: CONI BITS = /]
953:         DISARG OCT,CNISAV
954:         [ASCIZ/
955: /]
956:         -1
957:         PUSHJ P,DISMES
958:         ASCIZ/PACK = /
959:         LDB TAC,[POINT 3,LSTAT,11]      ;GET DEVICE ADDRESS
960:         PUSHJ P,DISLOC
961:         PUSHJ P,DISMES
962:         ASCIZ/  CYL = /
963:         LDB TAC,[POINT 16,SKDAT,31]
964:         PUSHJ P,DISLOC
965:         PUSHJ P,DISMES
966:         ASCIZ/  HD = /
967:         LDB TAC,[POINT 8,SKDAT+1,15]
968:         PUSHJ P,DISLOC
969:         PUSHJ P,DISMES
970:         ASCIZ/  REC = /
971:         LDB TAC,[POINT 8,SCDAT+1,7]
972:         PUSHJ P,DISLOC
973:         PUSHJ P,DISMES
974:         ASCIZ/
975: /
976:         SKIPN HAFLAG                    ;HOME ADDRESS TO PRINT?
977:         JRST NOHA
978:         PUSHJ P,DISMES
979:         ASCIZ/HA CYL = /
980:         LDB TAC,[POINT 16,HA,23]
981:         PUSHJ P,DISLOC
982:         PUSHJ P,DISMES
983:         ASCIZ/  HA HD = /
984:         LDB TAC,[POINT 8,HA+1,7]
985:         PUSHJ P,DISLOC
986:         PUSHJ P,DISMES
987:         ASCIZ/
988: /
989: NOHA:   MOVEI UUO,0                     ;START WITH CLASS 0
990: CLLOP:  SKIPN ERRCL0(UUO)               ;ANY ERRORS OF THIS CLASS
991:         JRST NOCL                       ;NO
992:         PUSHJ P,DISERR
993:         [ASCIZ/C/]
994:         DISARG DEC,UUO
995:         [ASCIZ/ = /]
996:         DISARG DEC,ERRCL0(UUO)
997:         [ASCIZ/  /]
998:         -1
999: NOCL:   CAIGE UUO,4                     ;HIGHEST COUNTING CLASS?
1000:         AOJA UUO,CLLOP
1001:         SKIPN DEATH
1002:         JRST NODIE
1003:         PUSHJ P,DISMES
1004:         ASCIZ/   DEATH/
1005: NODIE:  PUSHJ P,DISMES
1006:         ASCIZ/
1007: /
1008:         SKIPN SNSTYP
1009:         JRST TYPDON                     ;NO SENSE DATA, GO CHECK FOR ERRORS
1010:         PUSHJ P,DRIVEP                  ;PRINT DRIVE ID
1011:         PUSHJ P,DISMES
1012:         ASCIZ/  SENSE DATA =
1013: /
1014:         MOVE UUO,[POINT 8,SNSDAT]
1015:         PUSH P,[0]
1016: SNSLOP: ILDB TAC,UUO
1017:         JUMPE TAC,NULSNS
1018:         PUSH P,TAC
1019:         PUSHJ P,DISERR
1020:         DISARG DEC,-2(P)
1021:         [ASCIZ/ = /]
1022:         DISARG LOC,-1(P)
1023:         [ASCIZ/
1024: /]
1025:         -1
1026:         POP P,(P)
1027: NULSNS: AOS TAC,(P)
1028:         CAIGE TAC,SNSLEN
1029:         JRST SNSLOP
1030:         POP P,(P)
1031: TYPDON: PUSHJ P,DISMES
1032:         ASCIZ/
1033: 
1034: 
1035: /
1036: ERRGO:  SKIPN CSTOP
1037:         JRST NOSTOP
1038:         PUSHJ P,DISMES
1039:         ASCIZ/DO SOMETHING ABOUT IT, THEN PUSH CONTINUE.
1040: 
1041: 
1042: /
1043:         SETOM DISFLAG
1044:         PUSHJ P,DISFLUSH
1045:         HALT .+1
1046: NOSTOP: POPACS
1047:         PUSHJ P,BLAST           ;MAKE SURE ERROR GOES AWAY!
1048:         SKIPN DEATH
1049:         POPJ P,                 ;DIDN'T DIE, TRY AGAIN RETURN
1050:         MOVE TAC1,DSKACS+DDB            ;GET DDB ADDRESS
1051:         MOVEI AC3,IODERR        ;START WITH DEVICE ERROR
1052:         MOVE TAC,ERRCL2         ;GET DATA ERROR COUNT
1053:         CAML TAC,MAXCL2         ;OVER MAX LIMIT?
1054:         TRO AC3,IODTER          ;YES, GIVE DATA ERROR ALSO
1055:         IORM AC3,DEVIOS(TAC1)
1056:         JRST CPOPJ1             ;GIVE ERROR RETURN
1057: 
1058: DRIVEP: PUSHJ P,DISMES
1059:         ASCIZ/DRIVE /
1060:         LDB TEM,[POINT 6,SNSDAT+1,7]
1061:         JUMPN TEM,ISKNWN        ;UNKNOWN?
1062:         PUSHJ P,DISMES          ;YES
1063:         ASCIZ/UNKNOWN/
1064:         POPJ P,
1065: 
1066: ISKNWN: ANDI TEM,7                      ;JUST THE IMPORTANT BITS
1067:         ADDI TEM,"A"
1068:         JRST DISTYO
    DSKINT page# 0014 next  prev
1070: ;ERROR CLASS DESCRIPTIONS
1071: ;CLASS 0:                      BYTE    BIT
1072: ;       INVALID TRACK FORMAT    1       1
1073: ;       END OF CYLINDER         1       2
1074: ;       NO RECORD FOUND         1       4
1075: ;       FILE MASK VIOLATION     1       5
1076: ;       OPERATION INCOMPLETE    1       7
1077: ;       TOO MANY LOSING SEARCHES
1078: ;       DATA CHAIN ERROR (CHANNEL CONI)
1079: ;       ATTENTION (STATUS BYTE)
1080: ;       BUSY (STATUS BYTE)
1081: ;       UNIT EXCEPTION (STATUS BYTE)
1082: ;       COMMAND REJECT          0       0
1083: ;               AND NOT:
1084: ;                       WRITE INHIBITED
1085: ;                       DIAG LOAD INVALID DATA
1086: ;                       DIAG WRITE ERROR
1087: 
1088: ;CLASS 1:
1089: ;       BUS OUT PARITY          BYTE 0 BIT 2
1090: ;       SELECT ERROR (CHANNEL CONI)
1091: ;       NXM (CHANNEL CONI)
1092: ;       PARITY ERROR (CHANNEL CONI, CORE TO DISK)
1093: ;       SENSE FAILED (ERROR ON SENSE AFTER UNIT CHECK)
1094: ;       EQUIPMENT CHECK         BYTE 0 BIT 3
1095: ;               AND NOT:
1096: ;                       SEEK CHECK
1097: ;                       RETRY ABORTED
1098: 
1099: ;CLASS 2:
1100: ;       DATA CHECK              BYTE 0 BIT 4
1101: 
1102: ;CLASS 3:
1103: ;       SEEK CHECK              BYTE 0 BIT 3  BYTE 7 = 32 OR 33 (OCTAL)
1104: 
1105: ;CLASS 4:
1106: ;       OVERRUN                 BYTE 0 BIT 5
1107: ;       RETRY ABORTED           BYTE 0 BIT 3  BYTE 7 = 6
    DSKINT page# 0015 next  prev
1109: ;ERROR CLASS HANDLERS
1110: ERROR0: TDZA TAC1,TAC1          ;CLASS 0
1111: ERROR1: MOVEI TAC1,1            ;CLASS 1
1112: ERRORX: AOS DSKFLG              ;INDICATE ERROR SEEN
1113:         AOS TOTCL0(TAC1)
1114:         AOS TAC,ERRCL0(TAC1)
1115:         CAMGE TAC,MAXCL0(TAC1)  ;TOO MANY?
1116:         JRST TYTST
1117:         AOS DEATH
1118:         JRST TYPIT
1119: 
1120: TYTST:  TDNE TAC,TYMSK0(TAC1)   ;SHOULD WE TYPE THIS ONE?
1121:         SKIPE TYPCL0(TAC1)      ;OR MAYBE ALL OF THEM?
1122: TYPIT:  AOS TYPANY              ;TYPE OUT
1123:         POPJ P,
1124: 
1125: ERROR2: AOS DSKFLG
1126:         AOS TOTCL2
1127:         AOS TAC,ERRCL2
1128:         CAML TAC,MAXCL2
1129:         JRST TBAD
1130:         MOVEI TAC1,2            ;CLASS 2
1131:         JRST TYTST
1132: 
1133: TBAD:   AOS DEATH
1134:         AOS TYPANY
1135:         JRST    MRKBAD          ;JUMP TO DSKSER TO MARK A BAD TRACK
1136: 
1137: ERROR3: MOVEI TAC1,3            ;CLASS 3
1138:    PUSHJ P,ERRORX          ;COUNT AND TEST DEATH AND TYPING
1139:         SETZM ERRHA             ;NOW SETUP FOR READ HA AND RECAL.
1140:         SETZM ERRRCL
1141: REHA:   PUSHJ P,BLAST           ;CLEAR CHANNEL FOR READ HA
1142:         CONO IBM,CNEWST!CLREND!ACTCLR
1143:         CONO PMP,NEWST!UNEND!10!DSKCHN
1144:         DATAO PMP,[HA]
1145:         DATAO IBM,RDHACM
1146:         PUSHJ P,ISYNC
1147:         JRST REHA
1148:         CAIA
1149:         JRST DORCLA
1150:         CONO IBM,2
1151:         AOS TAC,ERRHA
1152:         CAMGE TAC,MAXHA
1153:         JRST REHA
1154:         AOS TYPANY
1155:         AOS CSTOP
1156:         PUSHACS
1157:         PUSHJ P,DISMES
1158:         ASCIZ/READ HOME ADDRESS LOST!
1159: /
1160:         POPACS
1161:         POPJ P,
1162: 
1163: DORCLA: SETOM HAFLAG
1164: DORCL:  PUSHJ P,BLAST
1165:         CONO IBM,CNEWST!CLREND!ACTCLR
1166:         CONO PMP,NEWST!UNEND!10!DSKCHN
1167:         DATAO IBM,RCALCM
1168:         PUSHJ P,ISYNC
1169:         JRST DORCL
1170:       JRST ERRCAL
1171:         MOVE TAC,PMPCNI
1172:         TRNE TAC,DEVEND                 ;DEVICE END YET?
1173:         POPJ P,                         ;YES, DONE
1174:         CONO IBM,ACTCLR                 ;GO AWAY
1175:         PUSHJ P,ISYNC
1176:         JRST DORCL
1177:         JRST ERRCAL
1178:         MOVE TAC,PMPCNI
1179:         TRNE TAC,DEVEND                 ;BETTER HAVE IT NOW
1180:         POPJ P,
1181: ERRCAL: CONO IBM,2
1182:         AOS TAC,ERRRCL
1183:         CAMGE TAC,MAXRCL
1184:         JRST DORCL
1185:         AOS TYPANY
1186:         AOS CSTOP
1187:         PUSHACS
1188:         PUSHJ P,DISMES
1189:         ASCIZ/RECALIBRATE FAILED!
1190: /
1191:         POPACS
1192:         POPJ P,
1193: 
1194: ERROR4: MOVEI TAC1,4
1195:         JRST ERRORX
1196: 
1197: ERROR5: AOS DSKFLG
1198:         LDB TAC,[POINT 3,LSTAT,11]
1199:         CAIG TAC,FPACKS-1
1200:         JRST SYSLOS
1201:         AOS DEATH                       ;ERROR BIT TO LOSER!!!!
1202:      MOVEI TAC,IOIMPM                ;USE IMPROPER MODE BIT TO INDICATE OFF LINE OR WRITE LOCK
1203:         MOVE TAC1,DSKACS+DDB
1204:         IORM TAC,DEVIOS(TAC1)
1205:         POPJ P,
1206: 
1207: SYSLOS: TRNN UUO,WRTINH                 ;WRITE INHIBITED?
1208:         JRST SYSLOX                     ;NO, MUST BE OFF LINE
1209:         PUSHJ P,DISMES
1210:         ASCIZ/PACK IN WRITE LOCK!
1211: /
1212: SYSLOZ: AOS TYPANY
1213:         AOS CSTOP
1214:         POPJ P,
1215: 
1216: SYSLOX: LDB TAC,[POINT 6,SNSDAT+1,7]    ;DRIVE ID
1217:         JUMPE TAC,SYSLOY
1218:         PUSHJ P,DISMES
1219:         ASCIZ/DRIVE NOT READY!
1220: /
1221:         JRST SYSLOZ
1222: 
1223: SYSLOY: PUSHJ P,DISMES
1224:         ASCIZ/ID PLUG NOT INSTALLED!
1225: /
1226:         JRST SYSLOZ
1227: 
1228: SENSE:  SETZM ERRSNS
1229: SENSE1: PUSHJ P,BLAST
1230:         CONO IBM,CNEWST!CLREND!ACTCLR
1231:         CONO PMP,NEWST!UNEND!10!DSKCHN
1232:        DATAO PMP,SNWCMA
1233:         DATAO IBM,SNSCMD
1234:         PUSHJ P,ISYNC
1235:         JRST SENSE1
1236:         CAIA
1237:         JRST CPOPJ1
1238:         AOS TAC,ERRSNS
1239:         CAML TAC,MAXSNS         ;TOO MANY?
1240:         POPJ P,                 ;LOSE BIG
1241:         JRST SENSE1
1242: 
1243: BLAST:  MOVEI TAC,10000
1244:         CONSO PMP,IDLE          ;TRY TO WAIT FOR PMP TO BECOME IDLE!
1245:         SOJG TAC,.-1
1246:         CONO IBM,CRESET!CNEWST!CLREND!ACTCLR    ;NOW RESET CHANNEL
1247:         MOVEI TAC,1000          ;LET HIM COOL OFF
1248:         SOJG TAC,.
1249:         POPJ P,                 ;LET'S HOPE THAT'S ENOUGH
    DSKINT page# 0016 next  prev
1251: ;HIGH PRIORITY INTERRUPT CODE (HPIC)
1252:         JSR 0,D2X                       ;DUMMY FOR FUNNY ERRORS
1253: D2IGO: DATAO PMP,SKWCMA                ;ISSUE SEEK COMMAND
1254:         DATAO IBM,SKCMD
1255: SKSRCH: MOVNI TAC,RCPBLK*3
1256:         MOVEM TAC,CT                    ;INITIALIZE LOSING SEARCH COUNT
1257:         SETOM LSTREC                    ;NO BACKUP FROM HERE
1258:         DATAO PMP,SCWCMA
1259:         DATAO IBM,SCCMD
1260:         JSR 0,D2X
1261: DOCMD:  DATAO PMP,XWCMA
1262:         DATAO IBM,XCMD
1263:         JSR 1,D2X
1264:         TRNN TAC,STMOD                  ;SUCCESSFUL SEARCH?
1265:         JRST RESRCH                     ;NO
1266:         AOS WCT                         ;INC WINNING SEARCHES
1267: READDN:                                 ;ENTER HERE FROM READ AFTER READ
1268:         LDB TAC,[POINT 8,SCDAT+1,7]     ;GET LAST RECORD NUMBER
1269:         MOVE TAC,RCLTAB(TAC)            ;GET WCMA INCREMENT FOR THIS RECORD.
1270:         ADD TAC,XWCMA                   ;INC WCMA
1271:         XCT ENDTST                      ;CHECK FOR WC COUNTED OUT
1272:         JRST D2FIN                      ;IT'S OUT. WE'RE DONE
1273:         MOVEM TAC,XWCMA                 ;ONLY AFTER IT'S NOT THE END, STORE XWCMA
1274:         MOVE TAC,SCDAT+1                ;GET RECORD NUMBER FROM SEARCH COMMAND
1275:         MOVEM TAC,LSTREC                ;LAST SUCCESSFUL RECORD
1276:         MOVSI TAC,(<BYTE(8)1>)
1277:         ADDB TAC,SCDAT+1                ;INCREMENT RECORD NUMBER FOR SEARCH
1278:         CAMG TAC,[BYTE(8)RCPTRK-1]      ;TRACK OVERFLOW?
1279:         JRST READON                     ;SAME TRACK. CHAIN TO READ OF NEXT RECORD
1280:         SKIPL DSKLRN
1281:         JRST D2EOD                      ;FILE SYSTEM - NOT ALLOWED TO WRAP AROUND
1282:         MOVE TAC,XWRAP                  ;THIS IS RECORD TO WRAP TO (SET UP AT CADDR)
1283:         MOVEM TAC,SCDAT+1
1284:         MOVE TAC,[BYTE(16)1]            ;PREPARE TO INC HEAD BY 1
1285:         ADDB TAC,SKDAT+1
1286:         CAMG TAC,[BYTE(16)TRKCYL-1]     ;OVERFLOW CYLINDER?
1287:         JRST SKOK                       ;NO, START SEEK
1288:         MOVEI TAC,14                   ;INC CYLINDER ADDRESS
1289:         ADDM TAC,SKDAT
1290:         SETZM SKDAT+1                   ;WRAP TO HEAD 0
1291:         LDB TAC,[POINT 3,SKCMD,21]      ;PACK NUMBER
1292:         MOVE TAC,NCYLSH(TAC)            ;<NUMBER CYLS THIS PACK>⊗4
1293:         CAMG TAC,SKDAT                  ;OFF END OF PACK?
1294:         JRST D2EOD                      ;YES, ALWAYS ERROR
1295: SKOK:   HLRZ TAC,SKDAT+1
1296:         LSH TAC,4
1297:         HRL TAC,SKDAT
1298:         LSH TAC,-2
1299:         MOVEM TAC,SCDAT                 ;SET UP SCDAT FROM CYL IN SKDAT AND HD IN +1
1300:         DATAO PMP,SKWCMA
1301:         DATAO IBM,SKCMD
1302:         JSR 2,D2X
1303:         JRST SKSRCH
    DSKINT page# 0017 next  prev
1305: ;MORE HPIC
1306: D2EOD:  SETOM D2LUZ
1307: D2FIN:  DATAO IBM,NOPCMD
1308:         JSR 2,D2X
1309:         SETOM D2DONE            ;FLAG OP COMPLETE TO DSKCHN
1310: LSRCH:  CONO PMP,NEWST!UNEND!10!DSKCHN
1311:         JSR 2,D2X
1312:         JRST D2BARF
1313: 
1314: RESRCH: DATAO IBM,NOPCMD        ;SEND NOOP TO STOP CHAINING AFTER FAILING SEARCH
1315:         AOS LCT
1316:         AOSL CT
1317:         JRST LSRCH              ;TOO MANY LOSING SEARCHES!
1318:         DATAO PMP,SCWCMA
1319:         DATAO IBM,SCCMD
1320:         JSR 1,D2X               ;LAST OP WAS SEARCH
1321:         SETOM LSTREC            ;RETRYING SEARCH, NO BACKUP
1322:         JRST DOCMD
1323: 
1324: ;OLD CODE, DO SEARCH AFTER WRITE
1325: SRCLUP: MOVNI TAC,RCPBLK*3
1326:         MOVEM TAC,CT
1327:         DATAO PMP,SCWCMA
1328:         DATAO IBM,SCCMD
1329:         JSR 2,D2X               ;LAST OP WAS WRITE
1330:         SETOM LSTREC            ;READ DONE, NO BACKUP
1331:         JRST DOCMD
1332: 
1333: ;NEW CODE, CHAIN READ FROM READ
1334: READON: MOVE TAC,XCMD           ;READ OR WRITE?
1335:         TRNE TAC,1
1336:         JRST SRCLUP             ;WRITE. MUST ALWAYS CHAIN WRITE FROM SEARCH
1337:         DATAO PMP,XWCMA         ;BUT, READ CAN BE CHAINED FROM READ
1338:         DATAO IBM,XCMD
1339:         JSR 2,D2X               ;LAST OP WAS READ
1340:         SETOM LSTREC            ;READ DONE, NO BACKUP
1341:         JRST READDN             ;LEAP IN HERE
1342: 
1343: ;TABLE OF WCMA INCREMENTS CORRESPONDING TO EACH RECORD OF A TRACK.
1344: RCLTAB:
1345: REPEAT BKPTRK,<
1346:         SECSIZ,,SECSIZ
1347: REPEAT RCPBLK,<
1348:         RECSIZ,,RECSIZ
1349: >
1350: >
1351: 
1352: BEND DSKINT
1353: 
1354: IXINT←IXINT
1355: 
1356: BEND DSKSER
 EOF: DSKINT end-of-file. cnt=16